//
//  ViewController.m
//  位运算
//
//  Created by 崔博 on 2018/7/2.
//  Copyright © 2018年 崔博. All rights reserved.
//

#import "ViewController.h"
#import "Person.h"
#import <objc/runtime.h>
typedef enum : NSUInteger {
    OptionsOne = 1,
    OptionsTwo = 2,
    OptionsThree = 4,
    OptionsFour = 8
} Options;

@interface ViewController ()

@end

@implementation ViewController
- (void)setOptions:(Options)optinon
{
    NSLog(@"%ld",optinon);
}
- (void)viewDidLoad {
    [super viewDidLoad];
    Person * p = [[Person alloc] init];
    
    __weak Person *p1 = p;
    SEL sel1 = sel_registerName("test");
    SEL sel2 = @selector(test);
    NSLog(@"%s---%s",sel1,sel2);
//    [self setOptions:OptionsOne | OptionsTwo];
//    NSKeyValueObservingOptions optin = NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew;
//    [self addObserver:self forKeyPath:@"age" options:optin context:nil];
}





@end
